package com.sky.controller.user;


import com.sky.result.Result;
import com.sky.service.HistoryTodayService;
import com.sky.vo.HistoryTodayVO;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("history-today")
@Api(tags = "历史上的今天相关接口")
@Slf4j
public class historyController {
    @Autowired
    private HistoryTodayService historyTodayService;

    @GetMapping("get")
    public Result<HistoryTodayVO> getHistoryToday(@RequestParam String date){
        HistoryTodayVO historyTodayVO = historyTodayService.getData(date);
        return Result.success(historyTodayVO);
    }
}
